<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        .da{
            height: 400px;
            display: flex;
        }
        .zuo{
            position: relative;
        }
        .zuo .mz{
            pointer-events: none;
            width: 200px;
            height: 200px;
            background-color: rgba(0, 0, 0,0.3);
            position: absolute;
            left: 0;
            top: 0;
            margin: auto;
            display: none;
        }
        .zuo img{
            width: 400px;
            height:400px;
        }
        .zo{
            height: 400px;
            margin-left: 15px;
        }
        li{
            list-style: none;
            margin-top: 16.8px;
        }
        li img{
           height: 60px;
        }
        .r{
            display: none;
            width: 400px;
            height: 400px;
            background-image: url(./images/1.jpg);
            margin-left: 10px;
        }
    </style>
</head>
<body>
    <div class="da">
        <div class="zuo">
            <img src="./images/1.jpg">
            <div class="mz">

            </div>
        </div>
        <div class="zo">
            <ul>
                <li><img src="./images/1.jpg"></li>
                <li><img src="./images/2.jpg"></li>
                <li><img src="./images/3.jpg"></li>
                <li><img src="./images/4.jpg"></li>
                <li><img src="./images/5.jpg"></li>
            </ul> 
        </div>
        <div class="r">

        </div>
    </div>
</body>
</html>
<script>
    var imgs=document.querySelectorAll('.zo img')
    var datu=document.querySelector('.da img')
    var da=document.querySelector('.zuo')
    var zt=document.querySelector('.zuo img')
    var mz=document.querySelector('.mz')
    var r=document.querySelector('.r')
    for(i=0;i<imgs.length;i++){
        imgs[i].onmouseover=function(){
            this.style.border='2px solid blue'
            datu.src=this.src
        }
        imgs[i].onmouseout=function(){
            this.style.border=''
        }
    }
    da.onmouseenter=function(){
        mz.style.display='block'
        r.style.display='block'
    }
    da.onmouseleave=function(){
        mz.style.display='none'
        r.style.display='none'
    }
    zt.onmousemove=function(e){
        var a=e.pageX-100;
        var b=e.pageY-100;
        a=a<0?0:a
        b=b<0?0:b
        a=a>200?200:a
        b=b>200?200:b
        mz.style.left=a+'px'
        mz.style.top=b+'px'
        r.style.backgroundImage=`url(${this.src})`
        r.style.backgroundPosition=`${-2*a}px ${-2*b}px`
    }
</script>